package nz.helloworld;

import java.awt.BorderLayout;

import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.JTextArea;

public class TestPanels extends JFrame {

	public static void main(String[] args) {
		TestPanels tp = new TestPanels();
		tp.setVisible(true);
	}

	public TestPanels() {
		this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

		JPanel panel = new JPanel();

		for (int i = 0; i < 2; i++) {
			panel.add(new JButton("Button " + i));
		}

		JTextArea textArea = new JTextArea(5, 15);
		textArea.setLineWrap(true);

		JScrollPane scrollPane = new JScrollPane(textArea);
		this.getContentPane().add(panel, BorderLayout.NORTH);

		this.getContentPane().add(scrollPane, BorderLayout.CENTER);
		this.pack();
	}

}
